<template>
  <div class="cart">
    <div class="bg"></div>
    <div class="warp_content">
      <div class="header">
        <span class="checkall">
          <i class="iconfont icon-weixuanzhong"></i>
          <span>全选</span>
        </span>
        <span class="clear">清空购物车</span>
      </div>
      <div class="main">
        <div class="item">
          <div class="left">
            <div class="check_item_all">
              <i class="iconfont icon-xuanzhong-01"></i>
            </div>
            <div class="picbox">
              <img src="../assets/tomato.png" />
            </div>
            <div class="text">
              <p class="title">番茄250g/份</p>
              <p class="price">
                <span class="now_price">¥33.6</span>
                <del>¥33.6</del>
              </p>
            </div>
          </div>
          <div class="right">
            <span class="jian radius">-</span>
            <span class="number">11</span>
            <span class="jia radius">+</span>
          </div>
        </div>
        <div class="item">
          <div class="left">
            <div class="check_item_all">
              <i class="iconfont icon-xuanzhong-01"></i>
            </div>
            <div class="picbox">
              <img src="../assets/tomato.png" />
            </div>
            <div class="text">
              <p class="title">番茄250g/份</p>
              <p class="price">
                <span class="now_price">¥33.6</span>
                <del>¥33.6</del>
              </p>
            </div>
          </div>
          <div class="right">
            <span class="jian radius">-</span>
            <span class="number">11</span>
            <span class="jia radius">+</span>
          </div>
        </div>
        <div class="item">
          <div class="left">
            <div class="check_item_all">
              <i class="iconfont icon-xuanzhong-01"></i>
            </div>
            <div class="picbox">
              <img src="../assets/tomato.png" />
            </div>
            <div class="text">
              <p class="title">番茄250g/份</p>
              <p class="price">
                <span class="now_price">¥33.6</span>
                <del>¥33.6</del>
              </p>
            </div>
          </div>
          <div class="right">
            <span class="jian radius">-</span>
            <span class="number">11</span>
            <span class="jia radius">+</span>
          </div>
        </div>
      </div>

      <footer>
        <img class="basket" src="../assets/basket.png" />
        <span class="count"></span>
        <!-- <span class="text">总计：<i>¥128</i></span> -->
        <span class="text">购物车是空的</span>
        <button class="btn_calc" @click="Calc">去结算</button>
      </footer>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.cart {
  .bg {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
  }
  .warp_content {
    background: #ffffff;

    position: fixed;
    width: 100%;
    bottom: 0;

    .header {
      padding: 18px 18px;
      display: flex;
      justify-content: space-between;

      border-bottom: 1px solid #f1f1f1;
      .checkall {
        i {
          color: #0091ff;
        }
        span {
          margin-left: 8px;
        }

        font-family: PingFangSC-Regular;
        font-size: 14px;

        line-height: 16px;
      }
      .clear {
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #333333;
        text-align: right;
        line-height: 16px;
      }
    }
    .main {
      padding: 16px 18px;
      .item {
        display: flex;
        justify-content: space-between;
        .left {
          display: flex;
          .check_item_all {
            line-height: 46px;
            color: #0091ff;
          }
          .picbox {
            margin: 0px 16px;
            width: 46px;
            height: 46px;
            img {
              width: 100%;
              height: 100%;
            }
          }
          .text {
            .title {
              font-family: PingFangSC-Medium;
              font-size: 14px;
              color: #333333;
              line-height: 23px;
            }
            .price {
              line-height: 23px;
              .now_price {
                font-family: PingFangSC-Semibold;
                font-size: 14px;
                color: #000000;
                line-height: 14px;
              }
              del {
                margin-left: 6px;
                font-family: PingFangSC-Regular;
                font-size: 10px;
                color: #999999;
                line-height: 20px;
              }
            }
          }
        }
        .right {
          align-items: center;
          height: 46px;
          line-height: 46px;
          .radius {
            width: 20px;
            height: 20px;
            border-radius: 10px;
            text-align: center;
            line-height: 20px;
            font-size: 12px;
          }
          display: flex;
          .jia {
            background: #0091ff;
            color: white;
          }
          .jian {
            border: 1px solid #666666;
          }
          .number {
            margin: 0 15px;
            line-height: 20px;
            font-size: 12px;
          }
        }
      }
      .item:nth-child(n + 2) {
        margin-top: 16px;
      }
    }

    footer {
      box-shadow: 0 -1px 1px 0 #f1f1f1;

      height: 49px;
      .basket {
        margin-left: 24px;
        margin-top: 11px;
        width: 28px;
        height: 26px;
      }
      .count {
        position: relative;
      }
      .count::after {
        content: "10";
        position: absolute;
        top: -15px;
        left: -5px;

        width: 10px;
        height: 10px;
        color: white;
        border-radius: 50%;

        background-color: red;
      }

      .text {
        margin-left: 32px;
        font-family: PingFangSC-Regular;
        font-size: 12px;
        color: #333333;
        line-height: 49px;
        i {
          font-family: PingFangSC-Medium;
          font-size: 18px;
          color: #e93b3b;
        }
      }
      .btn_calc {
        width: 98px;
        height: 49px;
        background: #4fb0f9;
        border: none;
        outline: none;
        color: white;
        line-height: 49px;
        text-align: center;
        float: right;
      }
    }
  }
}
</style>